﻿using System;
using System.CodeDom.Compiler;
using System.Diagnostics;
using Google.Protobuf;
using Google.Protobuf.Reflection;

namespace EggLink.DanhengServer.Proto
{
	// Token: 0x0200049B RID: 1179
	[DebuggerDisplay("{ToString(),nq}")]
	public sealed class EntityBuffChangeInfo : IMessage<EntityBuffChangeInfo>, IMessage, IEquatable<EntityBuffChangeInfo>, IDeepCloneable<EntityBuffChangeInfo>, IBufferMessage
	{
		// Token: 0x17000F2A RID: 3882
		// (get) Token: 0x06003516 RID: 13590 RVA: 0x00091C2B File Offset: 0x0008FE2B
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public static MessageParser<EntityBuffChangeInfo> Parser
		{
			get
			{
				return EntityBuffChangeInfo._parser;
			}
		}

		// Token: 0x17000F2B RID: 3883
		// (get) Token: 0x06003517 RID: 13591 RVA: 0x00091C32 File Offset: 0x0008FE32
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public static MessageDescriptor Descriptor
		{
			get
			{
				return EntityBuffChangeInfoReflection.Descriptor.MessageTypes[0];
			}
		}

		// Token: 0x17000F2C RID: 3884
		// (get) Token: 0x06003518 RID: 13592 RVA: 0x00091C44 File Offset: 0x0008FE44
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		MessageDescriptor IMessage.Descriptor
		{
			get
			{
				return EntityBuffChangeInfo.Descriptor;
			}
		}

		// Token: 0x06003519 RID: 13593 RVA: 0x00091C4B File Offset: 0x0008FE4B
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public EntityBuffChangeInfo()
		{
		}

		// Token: 0x0600351A RID: 13594 RVA: 0x00091C54 File Offset: 0x0008FE54
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public EntityBuffChangeInfo(EntityBuffChangeInfo other) : this()
		{
			this.entityId_ = other.entityId_;
			this.reason_ = other.reason_;
			this.buffChangeInfo_ = ((other.buffChangeInfo_ != null) ? other.buffChangeInfo_.Clone() : null);
			this.removeBuffId_ = other.removeBuffId_;
			this._unknownFields = UnknownFieldSet.Clone(other._unknownFields);
		}

		// Token: 0x0600351B RID: 13595 RVA: 0x00091CB8 File Offset: 0x0008FEB8
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public EntityBuffChangeInfo Clone()
		{
			return new EntityBuffChangeInfo(this);
		}

		// Token: 0x17000F2D RID: 3885
		// (get) Token: 0x0600351C RID: 13596 RVA: 0x00091CC0 File Offset: 0x0008FEC0
		// (set) Token: 0x0600351D RID: 13597 RVA: 0x00091CC8 File Offset: 0x0008FEC8
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public uint EntityId
		{
			get
			{
				return this.entityId_;
			}
			set
			{
				this.entityId_ = value;
			}
		}

		// Token: 0x17000F2E RID: 3886
		// (get) Token: 0x0600351E RID: 13598 RVA: 0x00091CD1 File Offset: 0x0008FED1
		// (set) Token: 0x0600351F RID: 13599 RVA: 0x00091CD9 File Offset: 0x0008FED9
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public SceneEntityBuffChangeType Reason
		{
			get
			{
				return this.reason_;
			}
			set
			{
				this.reason_ = value;
			}
		}

		// Token: 0x17000F2F RID: 3887
		// (get) Token: 0x06003520 RID: 13600 RVA: 0x00091CE2 File Offset: 0x0008FEE2
		// (set) Token: 0x06003521 RID: 13601 RVA: 0x00091CEA File Offset: 0x0008FEEA
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public BuffInfo BuffChangeInfo
		{
			get
			{
				return this.buffChangeInfo_;
			}
			set
			{
				this.buffChangeInfo_ = value;
			}
		}

		// Token: 0x17000F30 RID: 3888
		// (get) Token: 0x06003522 RID: 13602 RVA: 0x00091CF3 File Offset: 0x0008FEF3
		// (set) Token: 0x06003523 RID: 13603 RVA: 0x00091CFB File Offset: 0x0008FEFB
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public uint RemoveBuffId
		{
			get
			{
				return this.removeBuffId_;
			}
			set
			{
				this.removeBuffId_ = value;
			}
		}

		// Token: 0x06003524 RID: 13604 RVA: 0x00091D04 File Offset: 0x0008FF04
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public override bool Equals(object other)
		{
			return this.Equals(other as EntityBuffChangeInfo);
		}

		// Token: 0x06003525 RID: 13605 RVA: 0x00091D14 File Offset: 0x0008FF14
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public bool Equals(EntityBuffChangeInfo other)
		{
			return other != null && (other == this || (this.EntityId == other.EntityId && this.Reason == other.Reason && object.Equals(this.BuffChangeInfo, other.BuffChangeInfo) && this.RemoveBuffId == other.RemoveBuffId && object.Equals(this._unknownFields, other._unknownFields)));
		}

		// Token: 0x06003526 RID: 13606 RVA: 0x00091D84 File Offset: 0x0008FF84
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public override int GetHashCode()
		{
			int num = 1;
			if (this.EntityId != 0U)
			{
				num ^= this.EntityId.GetHashCode();
			}
			if (this.Reason != SceneEntityBuffChangeType.Default)
			{
				num ^= this.Reason.GetHashCode();
			}
			if (this.buffChangeInfo_ != null)
			{
				num ^= this.BuffChangeInfo.GetHashCode();
			}
			if (this.RemoveBuffId != 0U)
			{
				num ^= this.RemoveBuffId.GetHashCode();
			}
			if (this._unknownFields != null)
			{
				num ^= this._unknownFields.GetHashCode();
			}
			return num;
		}

		// Token: 0x06003527 RID: 13607 RVA: 0x00091E11 File Offset: 0x00090011
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public override string ToString()
		{
			return JsonFormatter.ToDiagnosticString(this);
		}

		// Token: 0x06003528 RID: 13608 RVA: 0x00091E19 File Offset: 0x00090019
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public void WriteTo(CodedOutputStream output)
		{
			output.WriteRawMessage(this);
		}

		// Token: 0x06003529 RID: 13609 RVA: 0x00091E24 File Offset: 0x00090024
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		void IBufferMessage.InternalWriteTo(ref WriteContext output)
		{
			if (this.EntityId != 0U)
			{
				output.WriteRawTag(24);
				output.WriteUInt32(this.EntityId);
			}
			if (this.buffChangeInfo_ != null)
			{
				output.WriteRawTag(34);
				output.WriteMessage(this.BuffChangeInfo);
			}
			if (this.RemoveBuffId != 0U)
			{
				output.WriteRawTag(88);
				output.WriteUInt32(this.RemoveBuffId);
			}
			if (this.Reason != SceneEntityBuffChangeType.Default)
			{
				output.WriteRawTag(96);
				output.WriteEnum((int)this.Reason);
			}
			if (this._unknownFields != null)
			{
				this._unknownFields.WriteTo(ref output);
			}
		}

		// Token: 0x0600352A RID: 13610 RVA: 0x00091EB8 File Offset: 0x000900B8
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public int CalculateSize()
		{
			int num = 0;
			if (this.EntityId != 0U)
			{
				num += 1 + CodedOutputStream.ComputeUInt32Size(this.EntityId);
			}
			if (this.Reason != SceneEntityBuffChangeType.Default)
			{
				num += 1 + CodedOutputStream.ComputeEnumSize((int)this.Reason);
			}
			if (this.buffChangeInfo_ != null)
			{
				num += 1 + CodedOutputStream.ComputeMessageSize(this.BuffChangeInfo);
			}
			if (this.RemoveBuffId != 0U)
			{
				num += 1 + CodedOutputStream.ComputeUInt32Size(this.RemoveBuffId);
			}
			if (this._unknownFields != null)
			{
				num += this._unknownFields.CalculateSize();
			}
			return num;
		}

		// Token: 0x0600352B RID: 13611 RVA: 0x00091F40 File Offset: 0x00090140
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public void MergeFrom(EntityBuffChangeInfo other)
		{
			if (other == null)
			{
				return;
			}
			if (other.EntityId != 0U)
			{
				this.EntityId = other.EntityId;
			}
			if (other.Reason != SceneEntityBuffChangeType.Default)
			{
				this.Reason = other.Reason;
			}
			if (other.buffChangeInfo_ != null)
			{
				if (this.buffChangeInfo_ == null)
				{
					this.BuffChangeInfo = new BuffInfo();
				}
				this.BuffChangeInfo.MergeFrom(other.BuffChangeInfo);
			}
			if (other.RemoveBuffId != 0U)
			{
				this.RemoveBuffId = other.RemoveBuffId;
			}
			this._unknownFields = UnknownFieldSet.MergeFrom(this._unknownFields, other._unknownFields);
		}

		// Token: 0x0600352C RID: 13612 RVA: 0x00091FD0 File Offset: 0x000901D0
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public void MergeFrom(CodedInputStream input)
		{
			input.ReadRawMessage(this);
		}

		// Token: 0x0600352D RID: 13613 RVA: 0x00091FDC File Offset: 0x000901DC
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		void IBufferMessage.InternalMergeFrom(ref ParseContext input)
		{
			uint num;
			while ((num = input.ReadTag()) != 0U)
			{
				if (num <= 34U)
				{
					if (num == 24U)
					{
						this.EntityId = input.ReadUInt32();
						continue;
					}
					if (num == 34U)
					{
						if (this.buffChangeInfo_ == null)
						{
							this.BuffChangeInfo = new BuffInfo();
						}
						input.ReadMessage(this.BuffChangeInfo);
						continue;
					}
				}
				else
				{
					if (num == 88U)
					{
						this.RemoveBuffId = input.ReadUInt32();
						continue;
					}
					if (num == 96U)
					{
						this.Reason = (SceneEntityBuffChangeType)input.ReadEnum();
						continue;
					}
				}
				this._unknownFields = UnknownFieldSet.MergeFieldFrom(this._unknownFields, ref input);
			}
		}

		// Token: 0x040014C9 RID: 5321
		private static readonly MessageParser<EntityBuffChangeInfo> _parser = new MessageParser<EntityBuffChangeInfo>(() => new EntityBuffChangeInfo());

		// Token: 0x040014CA RID: 5322
		private UnknownFieldSet _unknownFields;

		// Token: 0x040014CB RID: 5323
		public const int EntityIdFieldNumber = 3;

		// Token: 0x040014CC RID: 5324
		private uint entityId_;

		// Token: 0x040014CD RID: 5325
		public const int ReasonFieldNumber = 12;

		// Token: 0x040014CE RID: 5326
		private SceneEntityBuffChangeType reason_;

		// Token: 0x040014CF RID: 5327
		public const int BuffChangeInfoFieldNumber = 4;

		// Token: 0x040014D0 RID: 5328
		private BuffInfo buffChangeInfo_;

		// Token: 0x040014D1 RID: 5329
		public const int RemoveBuffIdFieldNumber = 11;

		// Token: 0x040014D2 RID: 5330
		private uint removeBuffId_;
	}
}
